<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
</style>

<template>
  <div class="h100 scroll f16 p15 b4">
    <mu-card
      class="mt20 p20 round f j-s a-c"
      v-for="(item,index) in shopList"
      :key="index"
      @click="toLoginB(item)"
    >
      <div class="img-cover round100 overhidden" style="width:1rem;height:1rem;">
        <img :src="item.logo" width="100%" height="100%">
      </div>
      <div class="pl5">
        <h1 class="f16">{{item.name}}</h1>
        <p class="f14 c666 mt5">点击进入管理>></p>
      </div>
    </mu-card>
  </div>
</template>

<script>
export default {
  data() {
    return {
      shopList: null
    };
  },
  created() {
    this.shopList = JSON.parse(localStorage.getItem("shopList"));
    console.log(this.shopList)
  },
  methods: {
    toLoginB(item) {
      this.$router.push({
        path: "./loginB",
        query: {
          shopId: item.id,
          shopType:item.shopType,
          phone: this.$route.query.phone
        }
      });
    }
  }
};
</script>


